<?php
/**
 * 砍价活动中奖名单Model
 *
 * Date: 2017/8/3
 * Time: 9:51
 */
defined('InNcPHP') or exit('Access Invalid!');

class  bargain_lotteryModel extends Model {

    public  function  __construct(){

        parent::__construct('bargain_lottery');
    }

    /**
     * 获取中奖名单分页列表
     * @param array $condition
     * @param string $field
     * @param int $page
     * @param string $order
     * @return mixed
     */
    public function getLotteryListPage($condition = array(), $field = '*', $page = 0, $order = 'lottery_time desc'){
        return $this->field($field)->where($condition)->page($page)->order($order)->select();
    }

    /**
     * 添加
     * @param array $param
     * @return mixed
     */
    public function addLottery($param){

        return $this->insert($param);
    }




}